1. Field of the Invention
The present invention relates to a focusing device for use in imaging devices such as electronic still cameras.
2. Description of the Related Art
Conventional focusing devices for use in video cameras employ as a focusing method a so-called xe2x80x9chill climbing servo methodxe2x80x9d. This servo method takes advantage of a property that in electric signals supplied from a photoelectric conversion element such as a CCD and a CMOS, the high-frequency component for an in-focus image tends to be greater than for an out-of-focus image. Therefore, according to this method, the image is determined as being in focus when the lens is in a position at which the high frequency component is maximum.
To determine the lens position where the amount of high frequency component is maximized, a focusing lens is moved in one direction either from an infinite far point or from the nearest point. In the course of such movement, a focus evaluation value, which is an indicator of the amount of high frequency component, is continuously calculated for a focus evaluation area defined in a part of the image. The lens is continuously moved as long as the focus evaluation value shows an increase. When a decrease in the focus evaluation value is detected, the value is regarded as having passed the peak, and the focusing lens is moved back to the position where the peak was achieved.
However, the amount of high frequency component is also affected by the inherent contrast of an object; An object with a lower contrast includes a smaller amount of high frequency component while an object with a higher contrast has more high frequency component. Thus, if the object has a low contrast, the peak cannot be easily detected by the above servo method, making it difficult to achieve accurate focusing. The method has another drawback that, when an object with a low contrast is located closer to the device and another object with a high contrast is located farther therefrom, the device is likely to focus on the object located farther therefrom.
An object of the present invention is to provide a focusing device that eliminates the effects of the high frequency component resulting from inherent object contrast and ensures accurate focusing.
According to one aspect of the present invention, a focusing device includes a movable focusing lens adapted to be moved to different positions, a conversion element for converting light incident on and transmitted through the focusing lens into a signal, a lens driving mechanism for moving the focusing lens, a focus evaluation value calculation unit for calculating a focus evaluation value for each position of the focusing lens based on the signal from the conversion element, and a lens position specifying unit for specifying the position of the focusing lens causing the focus evaluation value to be maximum as an in-focus lens position. The lens driving mechanism moves the focusing lens to the in-focus lens position specified by the lens position specifying unit. The focus evaluation value calculation unit uses a plurality of observation areas, and adds partial focus evaluation values obtained for respective observation areas to calculate the focus evaluation value. When adding the partial focus evaluation values, the focus evaluation value calculation unit weights the partial focus evaluation value for at least one of the plurality of observation areas based on the signal to position the focusing lens.
In this aspect, when the focus evaluation value calculation unit has calculated a focus evaluation value for each position of the focusing lens based on the signal from the conversion element, the lens position specifying unit specifies the focusing lens position causing the maximum focus evaluation value as the in-focus lens position. The lens driving mechanism moves the focusing lens to the in-focus lens position specified by the lens position specifying unit, to thereby achieve focusing. During this operation, the focus evaluation value calculation unit uses a plurality of observation areas, and calculates the focus evaluation value by adding partial focus evaluation values obtained for respective observation areas. Further, at such addition, the unit weights the partial focus evaluation value for at least one of the plurality of observation areas on the basis of said signal, so that the partial focus evaluation value for the observation area that is especially suited for focus evaluation is regarded as important. As a result, accurate focusing can be ensured even when the object has a low contrast, or when a plurality of objects of different types having different contrasts are present.
According to another aspect of the present invention, the focus evaluation value calculation unit detects, based on outputs of a plurality of unit areas in an observation area, respective maximum outputs of the unit areas, and calculates a partial focus evaluation value for the observation area by dividing a sum of the maximum outputs of the unit areas in the observation area by a sum of outputs of the plurality of unit areas in the observation area.
According to this aspect, as described above, the focus evaluation value calculation unit detects, based on outputs of the plurality of unit areas in an observation area, respective maximum outputs of the unit areas, and obtains a partial focus evaluation value for the observation area by dividing a sum of the maximum outputs of the unit areas in the observation area by a sum of outputs of the unit areas in the observation area. Consequently, object contrast in the observation area can be sharply detected irrespective of the illuminance of the object, and precise focusing can be achieved, even when the object contrast is low. Further, even when brightness changes as the focusing lens moves (for example, when an image is gradually clouded, or when a fluorescent light flickers), such adverse effects can be eliminated.
According to a still another aspect of the present invention, the focus evaluation value calculation unit corrects, to a prescribed value, a maximum of the partial focus evaluation values calculated for respective observation areas and respective positions of the focusing lens, and corrects the partial focus evaluation values other than the maximum in accordance with the ratio of said correction.
According to this aspect, a maximum of the partial focus evaluation values calculated for respective observation areas and respective positions of the focusing lens is corrected to a prescribed value, and also the partial focus evaluation values other than the maximum are corrected in accordance with the ratio of said correction, as described above. As a result, the partial focus evaluation values successively calculated as the focusing lens moves between the nearest point and the infinite far point are normalized as a ratio of the maximum corrected to the prescribed value, even when each observation area has a different illuminance. Therefore, according to this embodiment, changes in partial focus evaluation values for the respective observation areas detected as the focusing lens moves can be simply compared, and the observation area having the partial focus evaluation value exhibiting a considerable change, i.e. the observation area to be regarded as important for focusing, can easily be identified regardless of the difference in illuminance between the observation areas.
In a focusing device according to a further aspect of the present invention, when a minimum of the corrected partial focus evaluation values is large, an evaluation weight for the related observation area is reduced.
As described above, according to this aspect, the evaluation weight for the observation area is reduced when a minimum of the corrected partial focus evaluation values is large. When a minimum of the partial focus evaluation values successively calculated as the focusing lens moves and normalized as a ratio to a maximum corrected to the prescribed value is large, a difference between the minimum and the maximum is small, that is, change in the partial focus evaluation value observed as the focusing lens moves is small. Therefore, according to this aspect, observation areas as described above are weighted by a small amount, making possible correct identification of observation areas that should be regarded as important for focusing.
In the focusing device according to a further aspect of the present invention, when the partial focus evaluation value calculated for each of the plurality of observation areas and for each focusing lens position exhibits a large number of peaks as the focusing lens moves, the evaluation weight for the related observation area is reduced.
In this aspect, as described above, the evaluation weight for the observation area is reduced when the partial focus evaluation value calculated for each observation area and each focusing lens position exhibits a large number of peaks as the focusing lens moves. When the partial focus evaluation value shows a large number of peaks formed as the focusing lens moves, the likelihood of incorrectly identifying the focusing lens position by misidentifying a small peak as the maximum value is great. Therefore, the focusing device of this aspect enables correct identification of the observation area for focusing by weighting observation areas as described.
According to a further aspect of the present invention, the focusing device further includes a band pass filter for filtering component of the incident light in accordance with frequency. When the low frequency component of the incident light is filtered by the band pass filter and the maximum of the partial focus evaluation values calculated based on the filtered output is small, evaluation weight is reduced for the partial focus evaluation value calculated based on the output obtained by filtering high frequency component of the incident light with the band pass filter.
According to this aspect, as described above, when the maximum of the partial focus evaluation values calculated based on the output obtained by filtering low frequency component of the incident light with the band pass filter is small, the evaluation weight is reduced for the partial focus evaluation value calculated based on the output obtained by filtering high frequency component of the incident light with the band pass filter. It is empirically understood that, when the partial focus evaluation value does not show clear peaks when the low frequency component is filtered, correspondence between the peak in the partial focus evaluation value based on the output obtained by filtering the high frequency component and the in-focus position of the focusing lens is not reliable. Therefore, the focusing device according to this embodiment enables correct identification of the observation area in this manner.